package com.power.sifa.correction.api;

import com.plf.common.domain.ResponseDTO;
import com.power.sifa.correction.model.Crc_person;
import com.power.sifa.correction.model.pageInfo.Crc_personPageInfo;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 *  社区矫正人员信息 Feign
 */
public interface ICrc_personFeign {

    @GetMapping("/crc_person/getNextval")
    ResponseDTO getNextval();

    /**
     * 社区矫正人员信息分页列表
     */
    @PostMapping("/crc_person/list")
    ResponseDTO list(@RequestBody Crc_personPageInfo crc_personPageInfo);

    /**
    * 查看社区矫正人员信息
    */
    @GetMapping("/crc_person/view")
    ResponseDTO view(@RequestParam("id") String id);

    /**
    * 删除社区矫正人员信息
    */
    @PostMapping("/crc_person/delete")
    ResponseDTO delete(@RequestParam("id") String id);

    ///**
    // * 查看社区矫正人员信息 复合主键使用
    // */
    //@PostMapping("/crc_person/viewByPK")
    //ResponseDTO viewByPK(@RequestBody Crc_person.Crc_personPK pk);

    /**
     * 修改或保存社区矫正人员信息
     */
    @PostMapping("/crc_person/save")
    ResponseDTO save(@RequestBody Crc_person  crc_person);

    ///**
    // * 删除社区矫正人员信息 复合主键使用
    // */
    //@PostMapping("/crc_person/deleteByPK")
    //ResponseDTO deleteByPK(@RequestBody Crc_person.Crc_personPK pk);

    /**
     * 批量删除社区矫正人员信息
     */
    @PostMapping("/crc_person/batchDel")
    ResponseDTO batchDel(@RequestParam("ids") String ids);

     /**
     * 导出excel
     */
    @PostMapping("/crc_person/output")
    void output(HttpServletResponse response, @RequestBody Crc_personPageInfo crc_personPageInfo);

     /**
     * 导出excel模板
     */
    @PostMapping("/crc_person/exportExcelTemplate")
    void exportExcelTemplate(HttpServletResponse response);

     /**
     *	导入excel
     */
    @PostMapping("/crc_person/importExcel")
    ResponseDTO importExcel(@RequestBody MultipartFile file) throws IOException ;


    /**
     * 社区矫正人员信息分页查询
     */
    @PostMapping("/crc_person/pageQuery")
    ResponseDTO pageQuery(@RequestBody Crc_personPageInfo pageInfo);

    /**
     * 全部社矫人员信息查询
     */
    @PostMapping("/crc_person/findAllPerson")
    ResponseDTO findAllPerson(@RequestBody List<String> deptIds);


    /**
     * 全部社矫司法所信息查询
     */
    @PostMapping("/crc_person/findAllLawDeparts")
    ResponseDTO findAllLawDeparts();

    /**
     * 查询社矫人与其司法所信息
     * @param id
     * @return
     */
    @PostMapping("/crc_person/queryById")
    ResponseDTO queryById(String id);

    /**
     * 查询有效社矫人员列表
     * @return
     */
    @PostMapping("/crc_person/getList")
    ResponseDTO getList();


    /**
     * 下载勾选人员的照片数据
     * @param personIds 社矫人员id
     * @param response
     * @throws Exception
     */
    @PostMapping("/crc_person/downloadPersonPhoto")
    void downloadPersonPhoto(@RequestBody List<String> personIds, HttpServletResponse response) throws Exception;


    /**
     * 下载勾选人员的信息表格
     * @param personIds 社矫人员id
     * @param response
     * @throws Exception
     */
    @PostMapping("/crc_person/downloadPersonWord")
    ResponseEntity<byte[]> downloadPersonWord(@RequestBody List<String> personIds, HttpServletResponse response) throws Exception;
}
